﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Guline.SupportCMS.Models.Object
{
    public class MenuItem
    {
        [Key]
        public int ID { get; set; }
        public string Name { get; set; }
        public string Menu_URL { get; set; }
        public Nullable<int> Order { get; set; }

        public Nullable<int> ParentID { get; set; }
        [ForeignKey("ParentID")]
        public virtual MenuItem Parent { get; set; }

        [InverseProperty("Parent")]
        public virtual ICollection<MenuItem> Childrens { get; set; }

        public int ColorStyleID { get; set; }
        [ForeignKey("ColorStyleID")]
        public virtual ColorStyle ColorStyle { get; set; }
        public bool Enable { get; set; }

        public int MenuID { get; set; }
        [ForeignKey("MenuID")]
        public virtual Menu Menu { get; set; }
    }
}